<@override name="head">
<title>菜单管理</title>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/back/resources.js"></script>
</@override>
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id= "pagecontent">
    	<div id="content">
   			<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/back/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
				    <li class="navDiv_currentLi">菜单管理</li>
				</ul>  
 			</div>
 			
 			<form id="myform" action="${ctx}/back/main/resources/list" method="post">
 				<div id="navButtons">
					<div id="button">		
						<a href="${ctx}/back/main/resources/create" class="btn2">新建</a>
						<a class="btn2" id="all-btn-delete">批量删除</a>
					</div>
					<div id="searchValueDiv">
						<input type="hidden" id="page" name="page" value="${pager.page}"/>
						<input id="searchValue" type="text" name="searchValue" value="" tabindex="1" placeholder="请输入角色名"/>
						<input id="serachData_img" type="submit" value=""/>
					</div>
				</div>
 				<table border="1" class="tableFig">
 					<thead>
				        <tr class="theadTr">
				        	<th class="theadTh" style="width:5%;"><div class="checkboxStyleTh "></div></th>
							<th class="theadTh" style="width:5%;"></th>
							<th class="theadTh" style="width:10%;">菜单名称</th>
							<th class="theadTh" style="width:10%;">菜单类型</th>
							<th class="theadTh" style="width:15%;">唯一KEY</th>
							<th class="theadTh" style="width:25%;">URL地址</th>
							<th class="theadTh" style="width:15%;">描述</th>
							<th class="theadTh" style="width:15%;">操作</th>
				        </tr>
				    </thead>
				    <tbody>
				    	<#if resourcesList ??>
				        <#list resourcesList as resources>
				        <tr id="tbodyTr">
							<td class="tbodyTd"><div class="checkboxStyleTd ${resources.id!}a" id=${resources.id!}></div></td>
							<td class="tbodyTd"><a class="toggle_button" id=${resources.id!}>click</a></td>
							<td class="tbodyTd">${resources.name!}</td>
							<td class="tbodyTd">${resources.type!}</td>
							<td class="tbodyTd">${resources.resKey!}</td>
							<td class="tbodyTd">${resources.resUrl!}</td>
							<td class="tbodyTd">${resources.description!}</td>
							<td class="tbodyTd">
							<div id="listButtons">
								<a class="btn3" href='${ctx}/back/main/resources/edit?resourceId=${resources.id!}'>编辑</a>
								<a id="" class="btn3 father_de" value="${resources.id!}" class="btn3">删除</a>

							</div>
							</td>
				        </tr>
				        	<#if resources.children ??>
					        <#list resources.children as resourcechild>
					        <tr id="tbodyTr" class=${resourcechild.parentId!} >
								<td class="tbodyTd" style="padding-left:40px" id=${resourcechild.parentId!}><div class="checkboxStyleTd ${resourcechild.parentId!}a"  id="${resourcechild.id!}"></div></td>
								<td class="tbodyTd" style="padding-left:40px"><a class="toggle_button" id=${resourcechild.id!}>click</a></td>
								<td class="tbodyTd" >${resourcechild.name!}</td>
								<td class="tbodyTd" >${resourcechild.type!}</td>
								<td class="tbodyTd" >${resourcechild.resKey!}</td>
								<td class="tbodyTd" >${resourcechild.resUrl!}</td>
								<td class="tbodyTd" >${resourcechild.description!}</td>
								<td class="tbodyTd" >
								<div id="listButtons">
									<a class="btn3" href='${ctx}/back/main/resources/edit?resourceId=${resourcechild.id!}'>编辑</a>
									<a id="btn-delete" value="${resourcechild.id!}" class="btn3">删除</a>

								</div>
								</td>
					        </tr>
					        
							        <#if resourcechild.children ??>
							        <#list resourcechild.children as resourcechild_c>
							        <tr id="tbodyTr" class=${resourcechild_c.parentId!} >
										<td class="tbodyTd" style="padding-left:80px" id=${resourcechild_c.parentId!}><div class="checkboxStyleTd ${resourcechild_c.parentId!}a ${resourcechild.parentId!}a"  id="${resourcechild_c.id!}"></div></td>
										<td class="tbodyTd" style="padding-left:80px"></td>
										<td class="tbodyTd" >${resourcechild_c.name!}</td>
										<td class="tbodyTd">${resourcechild_c.type!}</td>
										<td class="tbodyTd">${resourcechild_c.resKey!}</td>
										<td class="tbodyTd">${resourcechild_c.resUrl!}</td>
										<td class="tbodyTd">${resourcechild_c.description!}</td>
										<td class="tbodyTd">
										<div id="listButtons">
											<a class="btn3" href='${ctx}/back/main/resources/edit?resourceId=${resourcechild_c.id!}'>编辑</a>
											<a id="btn-delete" value="${resourcechild_c.id!}" class="btn3">删除</a>
			
										</div>
										</td>
							        </tr>
									</#list>
									</#if>  
							 </#list>
							</#if>  
				        
						 </#list>
						</#if>  
				    </tbody>
 				</table>
 			</form>
		</div>
	</div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>